<?php
/**
 * $Id: Proveedores.json.php 28 2010-07-17 19:48:23Z corlatti $
 * @author Claudio Corlatti
 *
 */
require '../library/bootstrap/prepend.php';
IncludeHelper::inc('library/dto/response/ComboResponse.class.php');
IncludeHelper::inc ( 'library/session/CuentasCostos.class.php' );
IncludeHelper::inc('library/session/ComboHelper.class.php');

$tipo = '';

$result = new ComboResponse();
try {
	
	//if($tipo != ''){
		$session = new ComboHelper();
		$currencies = $session->getEnabledClients($tipo);
		$result->result->set(true, 'Ok');
		
		foreach ($currencies as $currency){
			$result->addValue($currency['id'], $currency['description']);
		}
	/*} else {
		throw new Exception('No se especifico el parametro TIPO');
	}*/
} catch (Exception $e){
	
	$result->result->set(false, $e->getMessage());
	
}

echo json_encode($result);
?>